package com.young.core.enums;


public enum JobStrategyEnum {
    FIRST(0,"第一个节点"),
    RANDOM(1,"随机节点"),
    ALL(2,"全节点"),
    SHARDING(3,"分片");

    public int code;

    public String meaning;

    JobStrategyEnum(int code, String meaning) {
        this.code = code;
        this.meaning = meaning;
    }

    public static JobStrategyEnum codeOf(int code) {
        for (JobStrategyEnum e : values()) {
            if(e.code == code) {
                return e;
            }
        }
        return null;
    }
}
